package com.nandi.deviceinstall.contract

import com.nandi.deviceinstall.base.BaseView
import com.nandi.deviceinstall.bean.*
import io.reactivex.Flowable

interface BindRecordContract {
    interface Model {
        fun getListRecord(token: String, current: Int, size: Int, areaCode: String, sort: Int,
                          townCode: String, disasterName: String, disNo: String, monitorNo: String,
                          startTime: String, endTime: String, isAppAdd: Int,devType: Int,devName: String,devFactory: String): Flowable<BindRecordBean>

        fun getListCity(token: String, district: String): Flowable<CityBean>

        fun getListTown(token: String, id: Int): Flowable<TownBean>

        fun getListDevFactory(token: String,factory: String): Flowable<DeviceFacBean>

        fun getListDisaster(token: String, current: Int, size: Int, areaCode: String): Flowable<DisasterBean>

        fun executeDisNum(token: String, disName: String, areaCode: String): Flowable<DisNumBean>

        fun executeDeleteBindRecord(token: String,id: Int): Flowable<BindDeleteBean>

        fun getListMonitorNum(token: String, unifiedCode: String): Flowable<ListMonitorNumBean>

        fun executeListDisName(token: String, disasterName: String, town: String): Flowable<DisNameBean>
    }

    interface View : BaseView {
        override fun showLoading()

        override fun hideLoading()

        override fun onError(msg: String, code: Int)

        fun handlerListRecordResult(result: BindRecordBean)

        fun handlerListCityResult(result: CityBean)

        fun handlerListTownResult(result: TownBean)

        fun handlerListDisasterResult(result: DisasterBean)

        fun handlerDisNum(result: DisNumBean)

        fun handlerDevFactory(result: DeviceFacBean)

        fun handlerDeleteBind(result: BindDeleteBean)

        fun handlerMonitorNum(result: ListMonitorNumBean)

        fun handlerDisNameResult(result: DisNameBean)

    }

    interface Presenter {

        fun requestListTown(token: String, id: Int)

        fun requestListCity(token: String, district: String)

        fun requestListDisaster(token: String, current: Int, size: Int, areaCode: String)

        fun requestListRecord(token: String, current: Int, size: Int, areaCode: String, sort: Int,
                              townCode: String, disasterName: String, disNo: String, monitorNo: String,
                              startTime: String, endTime: String, isAppAdd: Int,devType: Int,devName: String,devFactory: String)

        fun requestDisNum(token: String, disName: String, areaCode: String)

        fun requestListDevFactory(token: String,factory: String)

        fun requestDeleteBindRecord(token: String,id: Int)

        fun requestListMonitorNum(token: String, unifiedCode: String)

        fun requestDisName(token: String, disasterName: String, town: String)
    }
}